package com.stone.design.patterns.iterator.employeeiterator.javaiterator;

import com.stone.design.patterns.iterator.employeeiterator.Employee;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

/**
 * @description 删除get方法
 * @Time 2018/4/12 13:29
 * Created by Stone on 2018/4/12.
 */

public class CompanMin implements Company{

    List<Employee> list = new ArrayList<>();

    public CompanMin() {
        list.add(new Employee("Stone1", 16, "男", "程序员"));
        list.add(new Employee("Stone2", 16, "男", "程序员"));
        list.add(new Employee("Stone3", 16, "男", "程序员"));
        list.add(new Employee("Stone4", 16, "男", "程序员"));
        list.add(new Employee("Stone5", 16, "男", "程序员"));
    }
    

    @Override
    public Iterator iterator() {
        return new MinIterator(list);
    }
}
